﻿@{
    ViewBag.Title = "Register";
    Layout = "~/Views/Shared/_BackstageLayout.cshtml";
}

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache,must-revalidate">
    <title>注册-个人用户</title>

    <link href="~/CSS/theme/skin/frontend/default/sx_mall/register/css/personal_Register.css" rel="stylesheet" />
    <link href="~/CSS/theme/skin/frontend/default/sx_mall/register/css/personal_Register_base.css" rel="stylesheet" />
    <script type="text/javascript" async="" src="https://cscssl.jd.com/wl.js"></script>
    <script type="text/javascript" src="../misc/js/jquery-1.2.6.pack.js"></script>
</head>

<body>
    @*<div class="header-top">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-8 col-sm-5 top-curlang">
                                <!--<p class="welcome-msg">Default Welcome Msg! </p>-->
                                <div class="cur-lang-block">
                                    <div title="Currency" class="block block-currency jqtransformdone">
                                        <div class="jqTransformSelectWrapper" style="z-index: 10; width: 72px;">
                                            <div>
                                                <span style="width: 63px;">USD		</span><a href="#" class="jqTransformSelectOpen"></a>
                                            </div>
                                            <ul style="width: 70px; display: none; visibility: visible; height: 45px; overflow: hidden;">
                                                <li><a href="#" index="0">EGP		</a></li>
                                                <li><a href="#" index="1">EUR		</a></li>
                                                <li><a href="#" index="2" class="selected">USD		</a></li>
                                            </ul>
                                            <select id="select-currency" class="jqtransformdone jqTransformHidden" name="currency" title="Select Your Currency" onchange="setLocation(this.value)">
                                                <option title="Egyptian Pound" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/directory/currency/switch/currency/EGP/uenc/aHR0cDovL2RlbW8ubWFnZW50ZWNoLmNvbS90aGVtZXMvc21fbG92ZV9mYXNoaW9uL2luZGV4LnBocC8_X19fc3RvcmU9Z2VybWFueQ,,/">EGP		</option>
                                                <option title="Euro" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/directory/currency/switch/currency/EUR/uenc/aHR0cDovL2RlbW8ubWFnZW50ZWNoLmNvbS90aGVtZXMvc21fbG92ZV9mYXNoaW9uL2luZGV4LnBocC8_X19fc3RvcmU9Z2VybWFueQ,,/">EUR		</option>
                                                <option title="US Dollar" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/directory/currency/switch/currency/USD/uenc/aHR0cDovL2RlbW8ubWFnZW50ZWNoLmNvbS90aGVtZXMvc21fbG92ZV9mYXNoaW9uL2luZGV4LnBocC8_X19fc3RvcmU9Z2VybWFueQ,,/" selected="selected">USD		</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div title="Language" class="language-switcher jqtransformdone">

                                        <div class="jqTransformSelectWrapper" style="z-index: 10; width: 124px;">
                                            <div>
                                                <span title="Germany" style="width: 95px; background-image: url(/CSS/theme/skin/frontend/default/sx_mall/images/flags/flag-germany.jpg);">深圳</span><a href="#" class="jqTransformSelectOpen"></a>
                                            </div>
                                            <ul style="width: 122px; display: none; visibility: visible; height: 195px; overflow: hidden;">
                                                <li><a href="#" index="0" title="English" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-english.jpg);">English</a></li>
                                                <li><a href="#" index="1" class="selected" title="Germany" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-germany.jpg);">深圳</a></li>
                                                <li><a href="#" index="2" title="Italia" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-italia.jpg);">Italia</a></li>
                                                <li><a href="#" index="3" title="Spain" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-spain.jpg);">Spain</a></li>
                                                <li><a href="#" index="4" title="Brazil" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-brazil.jpg);">Brazil</a></li>
                                                <li><a href="#" index="5" title="Hungary" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-hungary.jpg);">Hungary</a></li>
                                                <li><a href="#" index="6" title="Cameroon" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-cameroon.jpg);">Cameroon</a></li>
                                                <li><a href="#" index="7" title="Argentina" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-argentina.jpg);">Argentina</a></li>
                                                <li><a href="#" index="8" title="Chile" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-chile.jpg);">Chile</a></li>
                                                <li><a href="#" index="9" title="Jamaica" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-jamaica.jpg);">Jamaica</a></li>
                                                <li><a href="#" index="10" title="Sweden" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-sweden.jpg);">Sweden</a></li>
                                                <li><a href="#" index="11" title="French" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-french.jpg);">French</a></li>
                                                <li><a href="#" index="12" title="Viet Nam" style="background-image: url(http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-vietnam.jpg);">Viet Nam</a></li>
                                            </ul>
                                            <select id="select-language" class="flag jqtransformdone jqTransformHidden" onchange="window.location.href=this.value">
                                                <option title="English" class="language-0" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-english.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=english&amp;___from_store=germany">English</option>
                                                <option title="Germany" class="language-1" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-germany.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=germany&amp;___from_store=germany" selected="selected">Germany</option>
                                                <option title="Italia" class="language-2" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-italia.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=italia&amp;___from_store=germany">Italia</option>
                                                <option title="Spain" class="language-3" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-spain.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=spain&amp;___from_store=germany">Spain</option>
                                                <option title="Brazil" class="language-4" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-brazil.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=brazil&amp;___from_store=germany">Brazil</option>
                                                <option title="Hungary" class="language-5" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-hungary.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=hungary&amp;___from_store=germany">Hungary</option>
                                                <option title="Cameroon" class="language-6" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-cameroon.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=cameroon&amp;___from_store=germany">Cameroon</option>
                                                <option title="Argentina" class="language-7" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-argentina.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=argentina&amp;___from_store=germany">Argentina</option>
                                                <option title="Chile" class="language-8" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-chile.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=chile&amp;___from_store=germany">Chile</option>
                                                <option title="Jamaica" class="language-9" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-jamaica.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=jamaica&amp;___from_store=germany">Jamaica</option>
                                                <option title="Sweden" class="language-10" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-sweden.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=sweden&amp;___from_store=germany">Sweden</option>
                                                <option title="French" class="language-11" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-french.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=french&amp;___from_store=germany">French</option>
                                                <option title="Viet Nam" class="language-12" style="background-image: url('http://demo.magentech.com/themes/sm_love_fashion/skin/frontend/sm_lovefashion/default/images/flags/flag-vietnam.jpg');" value="http://demo.magentech.com/themes/sm_love_fashion/index.php/?___store=vietnam&amp;___from_store=germany">Viet Nam</option>
                                            </select>
                                        </div>
                                    </div>

                                </div>
                            </div>
                            <div class="col-md-4 col-sm-7 toplinks-header">
                                <ul class="links-account">
                                    <li class="account-link">
                                        <a href="http://demo.magentech.com/themes/sm_love_fashion/index.php/customer/account/" title="我的账户">我的账户</a>
                                        <ul class="dropdown-link">
                                            <li><a href="#" title="Account info">帐户信息</a></li>
                                            <li><a href="#" title="Watch list">Watch list</a></li>
                                            <li><a href="#" title="Favorites">收藏</a></li>
                                            <li><a href="#" title="Purchase history">购买记录</a></li>
                                            <li><a href="#" title="My collections">我的收藏</a></li>
                                            <li><a href="#" title="Followed searches">Followed searches</a></li>
                                            <li><a href="#" title="Messages">留言</a></li>
                                        </ul>
                                    </li>

                                    <li class="register-link-help">
                                        <a href="#" title="帮助">帮助</a>
                                        <ul class="dropdown-link">
                                            <li><a href="#" title="Shipping &amp; Delivery">运费 &amp; 配送</a></li>
                                            <li><a href="#" title="Returns &amp; Refunds">Returns &amp; Refunds</a></li>
                                            <li><a href="#" title="Managing Your Account">Managing Your Account</a></li>
                                            <li><a href="#" title="Payment, Pricing &amp; Promotions">Payment, Pricing &amp; Promotions</a></li>
                                            <li><a href="#" title="Ordering">订购</a></li>
                                            <li><a href="#" title="需要更多帮助?">需要更多帮助?</a></li>
                                        </ul>
                                    </li>
                                </ul>
                                <ul class="links">
                                    <li class="first last"><a href="http://demo.magentech.com/themes/sm_love_fashion/index.php/checkout/" title="查看" class="top-link-checkout">查看</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>*@

    <div class="w" id="logo">
        <div>
            <a href="http://www.jd.com/">
                <img src="~/CSS/theme/skin/frontend/default/sx_mall/images/logo.png" alt="Sx商城" width="170" height="60" /><b></b>
        </div>
    </div>

    <div class="w" id="regist">
        <div class="mt">
            <div class="extra">
                <span style="text-align: right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="flk13" href="#"></a></span>
                <span>我已经注册，现在就&nbsp;<a href="https://passport.jd.com/uc/login" class="flk13">登录</a></span>
            </div>
        </div>
        <div class="mc">
            <form id="personRegForm" method="POST" onsubmit="return false;">
                <input type="hidden" name="regType" id="regType" value="person">
                <input type="hidden" name="uuid" id="uuid" value="${uuid}">
                <input type="hidden" name="verifymc" id="verifymc" value="">
                <input type="hidden" name="emailMg" id="emailMg">
                <input type="hidden" name="authcodeMg" id="authcodeMg">
                <input type="hidden" name="state" id="state" value="">
                <input type="hidden" name="tgKey" id="tgKey" value="">
                <div class="form" onselectstart="return false;">
                    <div class="item" id="select-regName">
                        <span class="label"><b class="ftx04">*</b>用户名：</span>

                        <div class="fl item-ifo">
                            <div class="o-intelligent-regName">
                                <input type="text" id="regName" name="regName" maxlength="20" class="text" tabindex="1" autocomplete="off" onpaste="return false;" value="" onfocus="if(this.value=='') this.value='';this.style.color='#333'" onblur="if(this.value=='') {this.value='';this.style.color='#999999'}" sta="0" style="color: rgb(153, 153, 153);">
                                <i class="i-name"></i>
                                <ul id="intelligent-regName" class="hide"></ul>
                                <label id="regName_succeed" class="blank"></label>
                                <label id="regName_error" class="null"></label>
                            </div>

                            <div class="intelligent-error hide" id="morePinDiv">
                                <h5>推荐您使用：</h5>

                                <div class="groom" id="morePinGroom"></div>
                            </div>
                            <input type="hidden" value="-1" id="hnschool" class="hide" sta="0">
                            <input type="hidden" id="schoolid" name="schoolid" class="hide">
                            <input type="hidden" name="uVAsRCRfpb" value="ikaNF">
                            <input type="hidden" id="hnseli" class="hide" value="-1">
                        </div>
                    </div>

                    <div id="capslock"><i></i><s></s>键盘大写锁定已打开，请注意大小写</div>
                    <div id="o-password">
                        <div class="item">
                            <span class="label"><b class="ftx04">*</b>请设置密码：</span>

                            <div class="fl item-ifo">
                                <input type="password" id="pwd" name="pwd" maxlength="20" class="text" tabindex="2" style="ime-mode: disabled;" onpaste="return  false" autocomplete="off" sta="0">
                                <i class="i-pass"></i>
                                <label id="pwd_succeed" class="blank"></label>
                                <label id="pwd_error" class="null"></label>
                                <span class="clr"></span>
                                <label class="hide" id="pwdstrength"><span class="fl">安全程度：</span><b></b></label>

                            </div>
                        </div>

                        <script type="text/javascript">
                            $('#pwd')[0].onkeypress = function (event) {
                                var e = event || window.event,
                                    $tip =
                                $('#capslock'),
                                        kc = e.keyCode || e.which, // 按键的keyCode
                                        isShift = e.shiftKey || (kc == 16) || false; // shift键是否按住
                                if (((kc >= 65 && kc <= 90) && !isShift) || ((kc >= 97 && kc <= 122) && isShift)) {
                                    $tip.show();
                                }
                                else {
                                    $tip.hide();
                                }
                            };
                        </script>

                        <div class="item">
                            <span class="label"><b class="ftx04">*</b>请确认密码：</span>

                            <div class="fl item-ifo">
                                <input type="password" id="pwdRepeat" name="pwdRepeat" maxlength="20" class="text" tabindex="3" onpaste="return  false" autocomplete="off" sta="0">
                                <i class="i-pass"></i>
                                <label id="pwdRepeat_succeed" class="blank"></label>
                                <label id="pwdRepeat_error" class="null"></label>
                            </div>
                        </div>

                        <div class="item" id="dphone">
                            <span class="label"><b class="ftx04">*</b>验证邮箱：</span>
                           <div class="fl item-ifo">
                                <input type="text" id="mail"  name="mail" >
                            </div>
                        </div>


                      @*<div class="item" id="dphone">
                            <span class="label"><b class="ftx04">*</b>验证邮箱：</span>
                           <div class="fl item-ifo">
                                <input type="text" id="mail"  name="mail" class="text" tabindex="4" onfocus="phoneFocus();" onkeyup="phoneKeyup();" onblur="phoneBlur();" autocomplete="off">
                               <i class="i-phone"></i>
                                <label id="phone_succeed" class=""></label>
                                <label id="phone_error" class="" style="display: none;"></label>
                            </div>
                        </div>*@


                        <div id="mobileCodeDiv" class="item " style="height: 62px;">
                            <span class="label"><b class="ftx04">*</b>邮箱验证码：</span>
                            <div class="fl item-ifo">
                                <input type="text" maxlength="6" autocomplete="off" tabindex="6" class="text text-1" name="mobileCode" style="ime-mode: disabled" id="mobileCode" onblur="mobileCodeBlur()" onfocus="mobileCodeFocus();">
                                <label class="blank invisible"></label>
                                <input type="button" onclick="sendRegMail()" value="获取邮箱验证码" />
                               @* <a class="btn" href="javascript:void(0);" onclick="sendRegMail()" id="sendMobileCode">
                                    <span id="dyMobileButton">获取邮箱验证码</span></a>
                                <span class="clr"></span>*@

                                <div class="msg-text" id="mobileCodeSucMessage"></div>
                                <label id="mobileCode_error" class="blank"></label>
                                <label id="mobileCode_succeed" class="blank invisible"></label>
                            </div>
                            <span class="clr"></span>
                        </div>
                    </div>
                    <div class="item item-new">
                        <span class="label">&nbsp;</span>

                        <div class="fl item-ifo">
                            <input type="checkbox" class="checkbox" checked="checked" id="readme" onclick="agreeonProtocol();">
                            <label for="protocol">我已阅读并同意<a href="#" class="blue" id="protocol">《Sxmall用户注册协议》</a></label>
                            <span class="clr"></span>
                            <label id="protocol_error" class="error hide">请接受服务条款</label>
                        </div>
                    </div>
                    <div class="item">
                        <span class="label">&nbsp;</span>
                        <input type="button" class="btn-img btn-regist" id="registsubmit" value="立即注册" tabindex="8" clstag="regist|keycount|personalreg|07" onclick="reg();">
                    </div>
                </div>
                <span class="clr"></span>
            </form>
        </div>
    </div>
    <div class="w">
        <div id="footer-2013">
            <div class="links">
                <a rel="nofollow" target="_blank" href="#">关于我们</a>|
                <a rel="nofollow" target="_blank" href="#">联系我们</a>|
                <a rel="nofollow" target="_blank" href="#">人才招聘</a>|
                <a rel="nofollow" target="_blank" href="#">商家入驻</a>|
                <a rel="nofollow" target="_blank" href="#">广告服务</a>|
                <a rel="nofollow" target="_blank" href="#">手机Sxmall</a>|
                <a target="_blank" href="#">友情链接</a>|
                <a target="_blank" href="#">销售联盟</a>|
                <a href="#" target="_blank">Sxmall社区</a>|
                <a href="#" target="_blank">Sxmall公益</a>
            </div>
            <div class="copyright">Copyright©2004-2014&nbsp;&nbsp;Sxmall.com&nbsp;版权所有</div>
        </div>
    </div>
    <script>

        function sendRegMail() {
            var mail = $("#mail").val();

            $.getJSON("../../Filter/ToSendMail.ashx?Type=SendMail&mail=" + mail, function (json) {
                alert(json);
            });
        }


        $(function () {

            $('.mail-verify').bind('click', function () {

                if (validateRegName() && validateFunction.regValidate()) {
                    oldEmail = "";
                    emailCheckResult = "";
                    oldMobile1 = "";
                    mobileResult1 = "";
                    emailCheckResult = "";
                    clearTimeout(countDown1.timer);
                    delayTime1 = 120;
                    delayFlag1 = true;
                    jQuery.jdThickBox({
                        type: "text", /*也可以是text,html,image,ajax,json*/
                        width: 500,
                        height: 260,
                        source: $('#box02').html(),
                        title: "验证邮箱",
                        _close_val: "×",
                        _con: "opinioncon",
                        _titleOn: true
                    }, function () {
                        $('#mail').bind('blur', function () {
                            var mail = $("#mail").val();
                            if (mail == "") {
                                $('#mail').removeClass().addClass("text");
                                $('#mail_error').removeClass("error");
                                $("#mail_error").hide();
                                $('#mail_succeed').removeClass('error-ico');
                                return;
                            }
                            var email = strTrim(mail);
                            var format = validateRules.isEmail(email);
                            var format2 = validateRules.betweenLength(email, 0, 50);
                            if (!format) {
                                $('#mail_error').removeClass().addClass("error");
                                $("#mail_error").html("邮箱地址不正确，请重新输入");
                                $('#mail_succeed').addClass('error-ico');
                                $('#mail').removeClass("highlight1").addClass('highlight2');
                                return;
                            } else {
                                if (!format2) {
                                    $('#mail_error').removeClass().addClass("error");
                                    $("#mail_error").html("邮箱地址长度应在4-50个字符之间");
                                    $('#mail_succeed').addClass('error-ico');
                                    $('#mail').removeClass("highlight1").addClass('highlight2');
                                    return;
                                }
                                jQuery.getJSON("../validateuser/isEmailEngaged?email=" + escape(email) + "&r=" + Math.random(),
                                        function (result) {
                                            emailResult = result.success;
                                            // 邮箱未被验证 可注册
                                            if (emailResult == 0) {
                                                $("#mail_error").removeClass().addClass("success").html("此邮箱可用");
                                                $('#mail_succeed').removeClass().addClass('blank succeed');
                                                $('#mail').removeClass('highlight2');
                                            }
                                            if (emailResult == 1) {
                                                $('#mail').removeClass().addClass("text highlight2");
                                                $('#mail_error').removeClass().addClass("error");
                                                $("#mail_error").html("该邮箱已被使用，请更换其它邮箱");
                                                $('#mail_succeed').removeClass().addClass('blank error-ico');
                                                return;
                                            }
                                            if (emailResult == 2) {
                                                $('#mail').removeClass().addClass("text highlight2");
                                                $('#mail_error').removeClass().addClass("error");
                                                $("#mail_error").html("邮箱地址不正确，请重新输入");
                                                $('#mail_succeed').removeClass().addClass('blank error-ico');
                                                return;
                                            }
                                        });

                            }
                        });
                        $('#mail').bind('focus', function () {
                            $('#mail').removeClass().addClass('text highlight1');
                            $("#mail_error").removeClass().addClass("focus").html("完成验证后，您可以用该邮箱登录和找回密码");
                            $("#mail_error").show();
                            $('#mail_succeed').removeClass('error-ico');
                        });
                        $('#JD_Verification2').click();
                    });
                }
            });
        })

    </script>
    <iframe class="thickframe" id="" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" style="display: none;"></iframe>
    <div class="thickdiv" id="" style="display: none;"></div>
</body>
</html>

